/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.cx1.model.utils;

import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.cx1.model.FurnishType;

/**
 *
 * @author ECH
 */
public class KFurnishTypes {
    
    public static final FurnishType UNFURNISHED = new FurnishType("1", "Unfurnished", null, null);
    public static final FurnishType SEMI_FURNISHED = new FurnishType("2", "Semi Furnished", null, null);
    public static final FurnishType FULLY_FURNISHED = new FurnishType("3", "Fully Furnished", null, null);
    
    //CX: TODO: temporary service
    public static FurnishType getFurnishType(String id) {
        FurnishType furnishType = null;
        if (StringUtils.equals(id, KFurnishTypeIDs.UNFURNISHED)) {
            furnishType = UNFURNISHED;
        }
        else if (StringUtils.equals(id, KFurnishTypeIDs.SEMI_FURNISHED)) {
            furnishType = SEMI_FURNISHED;
        }
        else if (StringUtils.equals(id, KFurnishTypeIDs.FULLY_FURNISHED)) {
            furnishType = FULLY_FURNISHED;
        }
        return furnishType;
    }
    
    public static List<FurnishType> getAll() {
        List<FurnishType> furnishTypes = new ArrayList<FurnishType>();
        furnishTypes.add(UNFURNISHED);
        furnishTypes.add(SEMI_FURNISHED);
        furnishTypes.add(FULLY_FURNISHED);
        return furnishTypes;
    }
}
